<?php

namespace app\api\model;

use think\Model;
use traits\model\SoftDelete;

class OrderVip extends Model
{
    use SoftDelete;

    protected $deleteTime = 'deletetime';

    public static function getByOrderNo($order_no)
    {
        return self::where('order_no', $order_no)->find();
    }

    public static function getUserVipIds($user_id)
    {
        return self::where('user_id', $user_id)->where('status', 1)->column('user_vip_id');
    }
}
